library(pacman)
pacman::p_load(rstudioapi)
setwd(dirname(getActiveDocumentContext()$path))
rm(list=ls())
options(warn = -1) #suppress unnecessary warnings
################################################################################

print("current file: 1_supply_within_dataprep.R")
source("1_supply_within_dataprep.R")

print("current file: 2_supply_within_estimation.R")
source("2_supply_within_estimation.R")

print("current file: 3_supply_across_dataprep.R")
source("3_supply_across_dataprep.R")

print("current file: 4_supply_across_estimation.R")
source("4_supply_across_estimation.R")

print("current file: 5_markdown_decomposition.R")
source("5_markdown_decomposition.R")

print("current file: 6_markdown_robustness_spatialunit.R")
source("6_markdown_robustness_spatialunit.R")

print("current file: 7_markdown_external_validation.R")
source("7_markdown_external_validation.R")

print("current file: 8_supply_residuals.R")
source("8_supply_residuals.R")

print("current file: 9_trade_costs_dataprep.R")
source("9_trade_costs_dataprep.R")

print("current file: 10_trade_costs_estimation.R")
source("10_trade_costs_estimation.R")

print("current file: 11_demand_dataprep.R")
source("11_demand_dataprep.R")

print("current file: 12_demand_estimation.R")
source("12_demand_estimation.R")

print("current file: 13_export_parameters.R")
source("13_export_parameters.R")


################################################################################
options(warn = 0) #reset default warnings


